package com.zbkj.service.dividend.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 分红档位配置请求对象
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "DividendPoolConfigRequest对象", description = "分红档位配置请求")
public class DividendPoolConfigRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "分红档位金额", required = true)
    @NotNull(message = "分红档位金额不能为空")
    @DecimalMin(value = "1", message = "分红档位金额必须大于0")
    private Integer level;

    @ApiModelProperty(value = "标签名称", required = true)
    @NotBlank(message = "标签名称不能为空")
    private String tagName;

    @ApiModelProperty(value = "分红比例", required = true)
    @NotNull(message = "分红比例不能为空")
    @Digits(integer = 1, fraction = 4, message = "分红比例格式不正确")
    @DecimalMin(value = "0.0001", message = "分红比例必须大于0")
    @DecimalMax(value = "1.0000", message = "分红比例不能大于1")
    private BigDecimal profitRatio;

    @ApiModelProperty(value = "档位描述")
    private String description;

    @ApiModelProperty(value = "是否启用")
    private Boolean isActive;
}